'use strict';

// const obj = {}; // 创建对面字面量
// const obj2 = new Object();

// const obj2 = { ...obj };
// const obj3 = Object.assign({}, obj);
// obj2.a = 0;
// obj2.d.push('wwwww');

// console.log(obj);
// console.log(obj2);
// console.log(obj3);

function Car(color) {
  // var this = {
  //   name = 'su7',
  //   height = 1400,
  //   lang = 5000,
  //   weight = 1000,
  //   color = color,
  // };
  // return this;

  this.name = 'su7';
  this.height = 1400;
  this.lang = 5000;
  this.weight = 1000;
  this.color = color;
  this.holder = ['ken', 'susan'];
}

let car1 = new Car('red');
let car2 = new Car('green');
car1.name = '劳';
car2.holder.push('susan sis');
console.log(car1, car2);
